package com.nc.delivery_project.shared.servicelocator;

import com.google.web.bindery.requestfactory.shared.ServiceLocator;
import com.nc.delivery_project.server.service.OrderWaypointService;

public class OrderWaypointServiceLocator implements ServiceLocator {

    private static OrderWaypointService serviceInstance;

    @Override
    public Object getInstance(Class<?> clazz) {
        return OrderWaypointServiceLocator.getServiceInstance();
    }

    private static OrderWaypointService getServiceInstance() {
        if (serviceInstance == null) {
            serviceInstance = new OrderWaypointService();
        }

        return serviceInstance;
    }
}
